﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPageContent.master" AutoEventWireup="false"
    CodeFile="PaymentVoucherHdr.aspx.vb" Inherits="PaymentVoucherHdr" %>

<%@ Register Src="~/UserControls/DDL.ascx" TagName="DoubleFilteredDropDownList" TagPrefix="uc1" %>
<%@ Register Src="~/UserControls/OneFilteredDropDownList.ascx" TagName="OneFilteredDropDownList"
    TagPrefix="uc2" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="sds" Namespace="Telerik.Web.SessionDS" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeaderPlaceHolder" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgPaymentVoucherHdr">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgPaymentVoucherHdr" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rgDeduction">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgDeduction" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rgCheque">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgCheque" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Office2010Blue"
        Transparency="20">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
    </telerik:RadWindowManager>
    <br />
    <br />
    <telerik:RadGrid ID="rgPaymentVoucherHdr" DataSourceID="odsPaymentVoucherHdr" CellSpacing="0"
        runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True"
        GridLines="None">
        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        <PagerStyle Mode="NumericPages"></PagerStyle>
        <MasterTableView DataSourceID="odsPaymentVoucherHdr" CommandItemDisplay="TopAndBottom"
            DataKeyNames="PaymentVoucherID" Width="880px" AllowMultiColumnSorting="True"
            GroupLoadMode="Server" NoMasterRecordsText="<%$ Resources:MainGrid , NoMasterRecordsText %>"
            NoDetailRecordsText="<%$ Resources:MainGrid , NoMasterRecordsText %>">
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
            <CommandItemTemplate>
                <table>
                    <tr>
                        <td>
                            <asp:ImageButton ID="ibtnInitInsert" CausesValidation="false" CommandName="Add" runat="server"
                                ImageUrl="../Design/images/Grid/AddRecord.gif" />
                            <asp:LinkButton ID="lbtnInitInsert" CausesValidation="false" runat="server" Font-Size="14px"
                                Text="<%$ Resources:MainGrid , AddNew %>" Visible="true" CommandName="Add" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="ibtnEditSelected" CausesValidation="false" CommandName="Edit"
                                runat="server" ImageUrl="../Design/images/Grid/Edit.gif" />
                            <asp:LinkButton ID="lbtnEditSelected" CausesValidation="false" runat="server" Font-Size="Medium"
                                Text="<%$ Resources:MainGrid , EditSelected %>" Visible="true" CommandName="Edit" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="ibtnDeleteSelected" CausesValidation="false" CommandName="DeleteSelected"
                                OnClientClick="<%$ Resources:MainGrid , OnClientClickDelete %>" runat="server"
                                ImageUrl="../Design/images/Grid/Delete.gif" />
                            <asp:LinkButton ID="lbtnDeleteSelected" Font-Size="Medium" CausesValidation="false"
                                OnClientClick="<%$ Resources:MainGrid , OnClientClickDelete %>" runat="server"
                                Text="<%$ Resources:MainGrid , DeleteSelected %>" CommandName="DeleteSelected" />&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="ibtnRebindGrid" CausesValidation="false" CommandName="RebindGrid"
                                runat="server" ImageUrl="../Design/images/Grid/Refresh.gif" />
                            <asp:LinkButton ID="lbtnRebindGrid" Font-Size="Medium" CausesValidation="false" runat="server"
                                Text="<%$ Resources:MainGrid , Refresh %>" CommandName="RebindGrid" />
                            <asp:Literal ID="ltrArabicSpace" meta:ResourceKey="ArabicSpace" runat="server">
                            </asp:Literal>
                        </td>
                    </tr>
                </table>
            </CommandItemTemplate>
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
            <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn SortExpression="PaymentVoucherID" HeaderButtonType="TextButton"
                    DataField="PaymentVoucherID" UniqueName="PaymentVoucherID" meta:ResourceKey="gbcPaymentVoucherID">
                    <HeaderStyle Width="20px" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="20px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn SortExpression="Year" HeaderButtonType="TextButton" DataField="Year"
                    UniqueName="Year" meta:ResourceKey="gbcYear">
                    <HeaderStyle Width="100px" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="100px" />
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn SortExpression="PaymentVoucherNo" HeaderButtonType="TextButton"
                    DataField="PaymentVoucherNo" UniqueName="PaymentVoucherNo" meta:ResourceKey="gbcPaymentVoucherNo">
                    <HeaderStyle Width="200px" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="200px" />
                </telerik:GridBoundColumn>
                <telerik:GridDateTimeColumn PickerType="DatePicker" SortExpression="PaymentVoucherDate"
                    DataFormatString="{0:MM/dd/yyyy}" ShowFilterIcon="false" HeaderButtonType="TextButton"
                    DataField="PaymentVoucherDate" UniqueName="PaymentVoucherDate" meta:ResourceKey="gbcPaymentVoucherDate">
                    <HeaderStyle Width="200px" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="200px" />
                </telerik:GridDateTimeColumn>
                <telerik:GridDropDownColumn DataField="CostCenter" ListTextField="<%$ Resources:SystemResource, lookup %>"
                    ReadOnly="True" SortExpression="CostCenter" UniqueName="CostCenter" Visible="true"
                    DataSourceID="odsCostCenter" ListValueField="MINOR" HeaderText="<%$ Resources:SystemResource, CostCenter %>">
                    <HeaderStyle Width="200px" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="200px" />
                </telerik:GridDropDownColumn>
                <telerik:GridDropDownColumn DataField="PaidforAccountNo" ListTextField="SupplierName"
                    SortExpression="PaidforAccountNo" UniqueName="PaidforAccountNo" DataSourceID="odsSupplier"
                    ListValueField="SupplierID" meta:ResourceKey="gbcPaidforAccountNo">
                    <HeaderStyle Width="200px" HorizontalAlign="Center" VerticalAlign="Middle" />
                    <ItemStyle Width="200px" />
                </telerik:GridDropDownColumn>
            </Columns>
        </MasterTableView>
        <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true">
        </ExportSettings>
        <GroupingSettings CaseSensitive="false" />
        <ClientSettings EnablePostBackOnRowClick="false">
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
    </telerik:RadGrid>
    <asp:ObjectDataSource ID="odsPaymentVoucherHdr" runat="server" SelectMethod="QueryDatabase"
        TypeName="DBPaymentVoucherHdrSP">
        <SelectParameters>
            <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
            <asp:Parameter DefaultValue="RtvPaymentVoucherHdr" Name="Operation" Type="String" />
            <asp:Parameter Name="PaymentVoucherID" Type="String" />
            <asp:Parameter Name="Year" Type="String" />
            <asp:Parameter Name="PaymentVoucherNo" Type="String" />
            <asp:Parameter Name="PaymentVoucherDate" Type="String" />
            <asp:Parameter Name="MainCostCenter" Type="String" />
            <asp:Parameter Name="CostCenter" Type="String" />
            <asp:Parameter Name="PaidforAccountNo" Type="String" />
            <asp:Parameter Name="Remarks" Type="String" />
            <asp:Parameter Name="RecordStatus" Type="String" />
            <asp:Parameter Name="LastUpdateBy" Type="String" />
            <asp:Parameter Name="LastUpdateDate" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="odsSupplier" runat="server" SelectMethod="QueryDatabase"
        TypeName="DBSupplierSP">
        <SelectParameters>
            <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
            <asp:Parameter DefaultValue="RtvSupplier" Name="Operation" Type="String" />
            <asp:Parameter Name="SupplierID" Type="String" />
            <asp:Parameter Name="SupplierName" Type="String" />
            <asp:Parameter Name="Mobile" Type="String" />
            <asp:Parameter Name="Tel" Type="String" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="WebAddress" Type="String" />
            <asp:Parameter Name="Email" Type="String" />
            <asp:Parameter Name="BankID" Type="String" />
            <asp:Parameter Name="BankAccountsID" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="odsCostCenter" runat="server" SelectMethod="QueryDatabase"
        TypeName="DBlookup_tableSP">
        <SelectParameters>
            <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
            <asp:Parameter DefaultValue="RtvCostCenter" Name="Operation" Type="String" />
            <asp:Parameter Name="MAJOR" Type="String" />
            <asp:Parameter Name="MINOR" Type="String" />
            <asp:Parameter Name="DescriptionAr" Type="String" />
            <asp:Parameter Name="DescriptionEn" Type="String" />
            <asp:Parameter Name="OrderID" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="odsAccount" runat="server" SelectMethod="QueryDatabase"
        TypeName="AccountsSP">
        <SelectParameters>
            <asp:Parameter DefaultValue="1" Name="QueryType" Type="Object" />
            <asp:Parameter DefaultValue="rtvAccounts" Name="Operation" Type="String" />
            <asp:Parameter Name="AccountNo" Type="String" />
            <asp:Parameter Name="AccountNameAr" Type="String" />
            <asp:Parameter Name="AccountNameEn" Type="String" />
            <asp:Parameter Name="ParentID" Type="String" />
            <asp:Parameter Name="Remarks" Type="String" />
            <asp:Parameter Name="AccountType" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
